// 导入用户处理函数
const user_handler=require('../router_handler/user')
// 导入用户注册的验证对象
const { reg_login_schema } = require('../schema/user')
// 导入解析验证的中间件
const expressJoi = require('@escook/express-joi')

const express = require('express')
const router = express.Router()
// 注册
router.post('/reguser',expressJoi(reg_login_schema),user_handler.regUser)

//登录
router.post('/login',expressJoi(reg_login_schema), user_handler.login)


module.exports = router